<script>
import {defineComponent} from 'vue'

export default defineComponent({
  name: "MyList",
  data() {
    return {
      persons: [
        {id: 1, name: "马云"},
        {id: 2, name: "马保国"},
        {id: 3, name: "马斯克"},
        {id: 4, name: "马糊涂"},
      ]
    }
  },
})
</script>

<template>
  <div class="list">
    <h1>人员列表</h1>
    <!--作用域插槽+具名-->
    <slot name="center" :persons="persons"></slot>
  </div>
</template>

<style scoped lang="less">

</style>
